package com.lf.cloud.grab.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class DateUtils {
	
	
	public static final String  FORMAT_DATE_TIME="yyyyMMdd HH:mm:ss";
	public static final String  FORMAT_DATE="yyyyMMdd";
	
	
	
	
	public static String getCurrDate(){
		Date date = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat(FORMAT_DATE);
		return sdf.format(date);
	}
	
	
	/**
	 * 
	 * 获取序列号
	 * @return
	 */
	public  static String getSerialId(){
		int radomInt = new Random().nextInt(999999);
		String currDate = DateUtils.getCurrDate();
		return currDate+String.valueOf(radomInt);
	}

}
